import { t } from '@services/i18n.service';
import { ElMessage, MessageOptionsWithType } from 'element-plus';

export const success = (
  message: string = t('common.Successful'),
  options: MessageOptionsWithType = {}
) => {
  return ElMessage.success({
    message,
    ...options,
  });
};

export const error = (
  message: string = t('common.Error'),
  options: MessageOptionsWithType = {}
) => {
  return ElMessage.error({
    message,
    ...options,
  });
};
